import { Injectable } from '@nestjs/common';
import { CreateActionTypeDto } from './dto/create-action-type.dto';
import { UpdateActionTypeDto } from './dto/update-action-type.dto';
import { PrismaService } from 'src/prisma/prisma.service';
import { Api } from 'src/utils/api';



@Injectable()
export class ActionTypesService {

  constructor(
    private prisma: PrismaService
  ) { }

  create(
    createActionTypeDto: CreateActionTypeDto,
  ) {
    return 'This action adds a new actionType';
  }

  async findAll() {
    const types = await this.prisma.actionTypes.findMany();
    // console.log("types--", types);
    return Api.ok(types);
  }

  findOne(id: number) {
    return `This action returns a #${id} actionType`;
  }

  update(id: number, updateActionTypeDto: UpdateActionTypeDto) {
    return `This action updates a #${id} actionType`;
  }

  remove(id: number) {
    return `This action removes a #${id} actionType`;
  }
}
